<!--<?php
print <<<EOT
-->

<script src="css/edit.js"></script>
<script>
<!--

var pid = '{$pid}';
var inventoryid = '{$inventoryid}';
var inventorytype = '{$inventory_type}';
var categoryid = '{$categoryid}';
var fid = '{$fid}';
var qty = '{$qty}';
var code = '{$code}';

function addCart(id) {

    var buy_num = parseInt(document.getElementById('buy_num_form').value);
    
    if (!IsNumber(buy_num)) {
        alert('请输入订购数量！');
        return false;
    } else {
        if (buy_num > qty) {
            alert('Item '+code+': Order Qty should not be more than the Available Qty.');
            return false;
        }
        
        url = "cart_view.php?act=add&inventorytype="+inventorytype+"&intype="+inventoryid+"&inventoryid="+inventoryid+"&pid="+id+"&js=1&addnum="+buy_num;
        document.getElementById('addtocontentiframe').src=url;
		//open(url);
    }
    
}


var go_url2 = 'inventory_details.php?inventoryid='+inventoryid+'&categoryid='+categoryid+'&fid=' + fid + '&pid=' + pid;
function goPreviewPage() {
    url = go_url2 +'&gotype=preview';
    location.href=url;
}

function goNextPage() {
    url = go_url2 +'&gotype=next';
    location.href=url;
}

//-->
</script>


             
                  
<!--
EOT;
if ($category_name != "") {
    print <<<EOT
-->                     
                  
                  <table width="568" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td bgcolor="FFFFFF" width="548">
                      <div><img name="" src="./images/spacer.gif" width="538" height="5" alt=""></div>
                        <table width="538" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td class="show_title">$category_name</td>
                          </tr>
                          <tr>
                            <td background="./images/colour/jf_colour_navy_100.gif"><img name="" src="./images/spacer.gif" width="1" height="1" alt=""></td>
                          </tr>                         
                        </table>

                        <div><img name="" src="./images/spacer.gif" width="538" height="5" alt=""></div></td>
                      <td bgcolor="FFFFFF" width="10"><img name="" src="./images/spacer.gif" width="10" height="10" alt=""></td>
                      <td  ></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>                   
                  </table>
                  
<!--
EOT;
}
print <<<EOT
-->                    
                  
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>                  
                  
                  <table width="568" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="548"><img name="" src="./images/spacer.gif" width="548" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td ></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="548" align="center"><img src="./attachments/{$product_info_ary['pic']}" alt="{$product_info_ary['name']}" name="jf_product_images_lg_image"  class="picture" id="jf_product_images_lg_image"></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td ></td>
                      <td ></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="548"><img name="" src="./images/spacer.gif" width="548" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td ></td>
                      <td width="4"><img name="" src="./images/spacer.gif" width="4" height="4" alt=""></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="548">
                      
                      <table width="548" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td  colspan="7" align="left" valign="middle" height="20"><b class="productDetailsGoldText">{$product_info_ary['code']}</b></td>
                            <td align="right" valign="middle"><!--a href="javascript:addWishlist('{$product_info_ary['id']}')">Send to Friends</a--></td>
                          </tr>

                          <tr>
                            <td background="./images/colour/jf_colour_navy_100.gif" colspan="8" height="1"><img name="" src="./images/spacer.gif" width="1" height="1" alt=""></td>
                          </tr>
                          
                          <tr>
                            <td colspan="8" height="15" align="left" valign="middle" class="productDetailsTitles">{$product_info_ary['name']} {$item_flag}</td>
                          </tr> 
                          
                          <tr><td colspan="8" height="15" ></td></tr>
                          
                          <tr>
                            <td height="15"  width="15%" rowspan=3 align="right" valign="middle"  width="10%"><strong>Dimensions</strong> :</td>
                            <td height="15"  width="10%" align="right" ><b>W</b></td>
                            <td height="15"  width="10%" align="right" ><b>D</b></td>
                            <td height="15"  width="10%" align="right" ><b>H</b></td>
                            <td height="15"  width="10%" align="left" class="productDetailsGoldText">&nbsp;</td>
                            <td height="15"  width="10%" align="left" class="productDetailsGoldText">&nbsp;</td>
                            <td height="15"  width="10%" align="left" class="productDetailsGoldText">&nbsp;</td>
                            <td>&nbsp;</td>
                          </tr> 
                          <tr>
                            <td height="15" colspan=1  align="right" valign="middle" class="productDetailsGoldText">{$product_info_ary['width']}</td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$product_info_ary['length']}</td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$product_info_ary['height']}</td>
                            <td height="15" align="left"  valign="middle" >&nbsp;<b>[cm]</b></td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$product_info_ary['cbm']}</td>
                            <td height="15" align="left"  valign="middle" >&nbsp;<b>[cbm]</b></td>
                            <td>&nbsp;</td>
                          </tr> 
                          <tr>
                            <td height="15" colspan=1 align="right" valign="middle" class="productDetailsGoldText">{$width_inch}</td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$length_inch}</td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$height_inch}</td>
                            <td height="15" align="left" valign="middle" >&nbsp;<b>[inch]</b></td>
                            <td height="15" align="right" valign="middle" class="productDetailsGoldText">{$product_info_ary['cuft']}</td>
                            <td height="15" align="left" valign="middle" >&nbsp;<b>[cuft]</b></td>
                            <td>&nbsp;</td>
                          </tr> 
                          
                          
                          <tr><td colspan="8" height="6" ></td></tr>
                          
                          $price_show

                          <tr>
                            <td height="15" colspan=1 align="right" valign="middle"><strong>Available Qty</strong> :</td>                            
                            <td align="right">{$qty}</td>
                            <td colspan=6 align="right"></td>
                          </tr>
                          
                          <tr>
                            <td height="15" colspan=1 align="right" valign="middle"><strong>Order Qty</strong> :</td>                            
                            <td align="right">&nbsp;<input id="buy_num_form" class="form" name="qty" size="2" value="" /></td>
                            <td colspan=6 align="right"></td>
                            
                            
                          </tr> 
                          
                          <tr><td colspan="8" height="4" ></td></tr>
                          
                          <tr>
                            <td colspan=2 align="left" valign="middle"><!--a href="javascript:;" onclick="addWishlist('{$product_info_ary['id']}', '{$product_info_ary['code']}')"><img src="./images/button/jf_button_wishlist.gif" alt="Add to Wishlist" width="82" height="13" border="0" id="jf_button_wishlist}"></a--></td>                            
                            <td colspan=1 align="right"></td>
                            <td colspan=5 align="right">
                            
                            
                            
                            </td>
                          </tr>
                          
                          <tr><td colspan="8" height="12" ></td></tr>
                          
                          <tr>
                          
<!--
EOT;
if ($no_preview_next) {
    print <<<EOT
-->     

                            <td colspan=7>&nbsp;</td>

<!--
EOT;
} else {
    print <<<EOT
--> 
                          
                            <td colspan=2>&nbsp;</td>
                            <td colspan=3 align="center" valign="middle">&nbsp;
                              <a onclick="goPreviewPage()" onmouseover="jf_button_back.src='./images/button/jf_button_back-over.gif'" onmouseout="jf_button_back.src='./images/button/jf_button_back.gif'">
                		      <img src="./images/button/jf_button_back.gif" id="jf_button_back" width="90" height="20" border="0">
                		      </a>
                            </td>                            
                            
                            <td colspan=2 align="left" valign="middle">
                              <a onclick="goNextPage()" onmouseover="jf_button_next.src='./images/button/jf_button_next-over.gif'" onmouseout="jf_button_next.src='./images/button/jf_button_next.gif'">
                	          <img src="./images/button/jf_button_next.gif" id="jf_button_next" width="90" height="20" border="0">
                	          </a>
                            </td>
                            
                            
                            
<!--
EOT;
}
print <<<EOT
--> 
                            
                            <td align="right" valign="middle" colspan=1>
                            <a href="javascript:;" onclick="addCart('{$product_info_ary['id']}')"  onMouseOver="MM_swapImage('jf_button_add_to_container','','./images/button/jf_button_add_to_container-over.gif',1)" onMouseOut="MM_swapImgRestore()">
                            <img src="./images/button/jf_button_add_to_container.gif" alt="Add to Container" width="120" height="20" border="0" id="jf_button_add_to_container}">
                            </a>
                              <!--a href="javascript:;" onClick="MM_openBrWindow('printer.php?page=product_details&pid={$product_info_ary['id']}','printerfriendly','scrollbars=yes,width=600,height=500')" onMouseOver="MM_swapImage('jf_button_printer_friendly','','./images/button/jf_button_print-over.gif',1)" onMouseOut="MM_swapImgRestore()">
                              <img src="./images/button/jf_button_print.gif" alt="Printer Friendly" name="jf_button_printer_friendly" width="90" height="20" border="0" id="jf_button_printer_friendly">
                              </a-->
                            </td>
                            
                            
                            
                            
                          </tr>
                          
                          <tr><td colspan="8" height="16" ></td></tr>                          
                                                
                          <!--tr>
                            <td colspan="8" height="15" align="left" valign="middle"><strong>Dimensions:</strong> &nbsp;
                              Length: <span class="productDetailsGoldText"> {$product_info_ary['length']} </span> &nbsp;
                              Width: <span class="productDetailsGoldText"> {$product_info_ary['width']} </span> &nbsp;
                              Height: <span class="productDetailsGoldText"> {$product_info_ary['height']} </span> &nbsp;<br>
                              <strong>CBM:</strong> <span class="productDetailsGoldText"> {$product_info_ary['cbm']} </span> &nbsp;<br>
                              <!--Depth: <span class="productDetailsGoldText"> n/a </span>--> 
                            </td>
                          </tr-->  
                                                  
                        </table>
                     </td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td ></td>
                      <td ></td>
                    </tr>
                    <tr>
                      <td width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="548"><img name="" src="./images/spacer.gif" width="548" height="5" alt=""></td>
                      <td bgcolor="FFFFFF" width="5"><img name="" src="./images/spacer.gif" width="5" height="5" alt=""></td>
                      <td></td>
                      <td></td>
                    </tr>
                   
                  </table>
                  
                  
                  <div><img name="" src="./images/spacer.gif" width="568" height="4" alt=""></div>                  
                  <iframe name='addtocontentiframe' width=0 height=0 src="about:blank" id='addtocontentiframe' style="visibility:hidden;"></iframe>                  
                  <div><img name="" src="./images/spacer.gif" width="10" height="2" alt=""></div></td>
                            
                                           
            
          
       </div></div>
        
        
<script>
<!--

var height2 =screen.height;
var width2 =screen.width;
//alert(width2+"x"+height2);
if (height2 <769) {
//if (height2 <1025) {
    location.href="#small_screen";
}

-->
</script>

<!--
EOT;
?>-->